﻿
<Window x:Class="Crm2011EventBinder.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Crm 2011 Event Binder" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Loaded="Window_Loaded" d:DesignHeight="718" d:DesignWidth="1375" SizeToContent="Manual" Padding="25" OverridesDefaultStyle="False" WindowState="Maximized">
    <DockPanel Name="dockParent" Background="#14000000" LastChildFill="True">
        <DockPanel Height="30" Name="dockBottom" DockPanel.Dock="Bottom">
            <Border BorderThickness="0,1,0,0" BorderBrush="#40000000">
                <Grid>
                    <StatusBar Name="stBar" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch">
                        <StatusBarItem>
                            <TextBlock Name="lblConnectionLabel">Connection Status:</TextBlock>
                        </StatusBarItem>
                        <StatusBarItem>
                            <TextBlock Name="lblConnectionStatus">Disconnected</TextBlock>
                        </StatusBarItem>
                    </StatusBar>
                </Grid>
            </Border>
        </DockPanel>
        <DockPanel Name="dockLeft" Background="#95000000">
            <StackPanel Name="stackLeft" Margin="0">
                <Expander Header="Saved Configurations" Name="expanderSavedConfig" IsExpanded="True" Padding="6" Margin="6,6,6,0" >
                    <Expander.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#ffffffff" Offset="0"/>
                            <GradientStop Color="#e9e9e9e9" Offset="1"/>
                            </LinearGradientBrush>
                    </Expander.Background>
                    <GroupBox Header="Connections" Name="groupBox1" Margin="10" Padding="10,10,10,10" BorderBrush="#75000000" Background="#FFFFFAEB">
                        <Grid>
                            <Label Content="Select connection" Foreground="Black" Height="28" HorizontalAlignment="Left" Name="lblSavedConfig2" VerticalAlignment="Top" Margin="-3,1,0,0" />
                            <ComboBox Height="23" HorizontalAlignment="Left" Margin="0,23,0,0" Name="cmbConnections" VerticalAlignment="Top" Width="271" />
                            <Button Click="btnSelectSavedConfig_Click" Content="Connect" Height="23" HorizontalAlignment="Left" Margin="277,23,0,0" Name="btnSelectSavedConfig" VerticalAlignment="Top" Width="75" FontWeight="Normal" />
                            
                            <Button Click="btnNewConnect_Click" Content="New connection" Height="23" HorizontalAlignment="Left" Margin="0,60,0,0" Name="btnNewConnect" VerticalAlignment="Top" Width="118" FontStyle="Normal" FontWeight="Normal" />
                            <Button Click="btnDeletePrevious_Click" Content="Clear connections" Height="23" HorizontalAlignment="Left" Margin="224,60,0,0" Name="btnDeletePrevious" VerticalAlignment="Top" Width="128" FontWeight="Normal" />
                        </Grid>
                    </GroupBox>
                </Expander>
                <Expander Header="Discovery" Name="expanderDisco" IsExpanded="False" IsEnabled="True" Padding="6" Margin="6,0,6,0">
                    <Expander.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#ffffffff" Offset="0"/>
                            <GradientStop Color="#e9e9e9e9" Offset="1"/>
                        </LinearGradientBrush>
                    </Expander.Background>
                    <GroupBox Header="Discovery" Name="groupBox2" Margin="10" Padding="10,10,10,10" BorderBrush="#75000000" Background="#FFFFFAEB">
                        <Grid>
                            <Label Content="Specify server name and port" Height="28" HorizontalAlignment="Left" Margin="-3,1,0,0" Name="lblDiscover2" VerticalAlignment="Top" Foreground="Black" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="0,30,0,0" Name="txtDiscover" VerticalAlignment="Top" Width="273" />
                            <Button Content="Discover" Height="23" HorizontalAlignment="Left" Margin="289,29,0,0" Name="btnDiscover" VerticalAlignment="Top" Width="75" Click="btnDiscover_Click" />
                            <Label Content="internalcrm.corp.local:[port]" Height="28" HorizontalAlignment="Left" Margin="-2,47,0,0" Name="lblDiscover" VerticalAlignment="Top" Foreground="Black" />
                            <CheckBox Content="SSL" Height="16" HorizontalAlignment="Left" Margin="0,77,0,0" Name="chkSSL" VerticalAlignment="Top" />
                        </Grid>
                    </GroupBox>
                </Expander>
                <Expander Header="Organization" Name="expanderOrganization" IsEnabled="True" IsExpanded="False" Padding="6" Margin="6,0,6,0">
                    <Expander.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#ffffffff" Offset="0"/>
                            <GradientStop Color="#e9e9e9e9" Offset="1"/>
                        </LinearGradientBrush>
                    </Expander.Background>
                    <GroupBox Header="Organization" Name="groupBox3" Margin="10" Padding="10,10,10,10" BorderBrush="#75000000" Background="#FFFFFAEB">
                        <Grid>
                            <Label Content="Select organization" Foreground="Black" Height="28" HorizontalAlignment="Left" Margin="-3,1,0,0" Name="lblOrganization" VerticalAlignment="Top" />
                            <Button Content="Select" Height="23" HorizontalAlignment="Left" Margin="277,33,0,0" Name="btnSelectOrganization" VerticalAlignment="Top" Width="75" Click="btnSelectOrganization_Click" />
                            <ComboBox Height="23" HorizontalAlignment="Left" Margin="-3,33,0,0" Name="cmbOrganizations" VerticalAlignment="Top" Width="273" />
                        </Grid>
                    </GroupBox>
                </Expander>
                <Expander Header="Credentials" Name="expanderCredentials" IsEnabled="True" IsExpanded="False" Padding="6" Margin="6,0,6,0">
                    <Expander.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#ffffffff" Offset="0"/>
                            <GradientStop Color="#e9e9e9e9" Offset="1"/>
                        </LinearGradientBrush>
                    </Expander.Background>
                    <GroupBox Header="Domain credentials" Name="groupBox4" Margin="10" Padding="10,10,10,10" BorderBrush="#75000000" Background="#FFFFFAEB">
                        <Grid>
                            <Label Content="Domain\Username" Foreground="Black" Height="28" HorizontalAlignment="Left" Margin="-3,1,0,0" Name="lblCredentials" VerticalAlignment="Top" />
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="0,26,0,0" Name="txtUsername" VerticalAlignment="Top" Width="181" />
                            <Label Content="Password" Foreground="Black" Height="28" HorizontalAlignment="Left" Margin="-3,51,0,0" Name="lblPassword" VerticalAlignment="Top" />
                            <PasswordBox Height="23" HorizontalAlignment="Left" Margin="0,74,0,0" Name="txtPassword" VerticalAlignment="Top" Width="181" />
                            <Button Content="Save connection" Height="23" HorizontalAlignment="Left" Margin="226,74,0,0" Name="btnSaveAndConnect" VerticalAlignment="Top" Width="126" Click="btnSavConnection_Click" />
                        </Grid>
                    </GroupBox>

                </Expander>
                <Expander Header="Connection Info" Name="expanderInfo" IsEnabled="True" IsExpanded="False" Padding="6" Margin="6,0,6,0">
                    <Expander.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#ffffffff" Offset="0"/>
                            <GradientStop Color="#e9e9e9e9" Offset="1"/>
                        </LinearGradientBrush>
                    </Expander.Background>
                    <GroupBox Header="Domain credentials" Name="groupBox5" Margin="10" Padding="10,10,10,10" BorderBrush="#75000000" Background="#FFFFFAEB">
                        <Grid>
                            <Label Content="[Server]" Foreground="Black" Height="28" HorizontalAlignment="Left" Margin="6,6,0,0" Name="lblInfoServer" VerticalAlignment="Top" />
                            <Label Content="[Organization]" Foreground="Black" Height="28" HorizontalAlignment="Left" Margin="6,22,0,0" Name="lblInfoOrganization" VerticalAlignment="Top" />
                            <Label Content="[Domain\Username]" Foreground="Black" Height="28" HorizontalAlignment="Left" Margin="6,39,0,0" Name="lblInfoUsername" VerticalAlignment="Top" />
                            <Button Content="Retrieve Entities" Height="23" HorizontalAlignment="Left" Margin="217,40,0,0" Name="btnRetrieve" VerticalAlignment="Top" Width="135" Click="btnRetrieve_Click" />
                        </Grid>
                    </GroupBox>

                </Expander>
            </StackPanel>
        </DockPanel>
        <DockPanel Name="dockRight" IsEnabled="false">
            <Grid Name="grid1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="120" />
                    <RowDefinition Height="529*" />
                </Grid.RowDefinitions>
                <TabControl Grid.Row="1" Margin="6,6,6,6" Name="tabContainer">
                    <TabItem Header="Bind Events" Name="tabForms">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Grid Grid.Column="0">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="40*" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="20*" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="40*" />
                                </Grid.RowDefinitions>
                                
                                <GridSplitter Grid.Row="1" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="3" Name="gridSplitterRow4"  Width="Auto" ResizeDirection="Rows" Background="#95000000"/>
                                <GridSplitter Grid.Row="3" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="3" Name="gridSplitterRow6"  Width="Auto" ResizeDirection="Rows" Background="#95000000"/>

                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Grid.Row="0" Content="Forms" Background="#7AFFFFA3" />
                                    <ScrollViewer Grid.Row="1" CanContentScroll="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                                        <TreeView Name="tvForms"  BorderBrush="{x:Null}" SelectedItemChanged="tvForms_SelectedItemChanged">
                                        </TreeView>
                                    </ScrollViewer>
                                    <Label Grid.Row="2" Background="#7AFFFFA3" Content="Displays form elements.  Double click field to copy their logical name." FontStyle="Italic" Padding="5,2" Foreground="#B6000000" />
                                </Grid>
                                <Grid Grid.Row="2">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="Linked web resources" Background="#87BCACFF" />
                                    <StackPanel Grid.Row="0" FlowDirection="LeftToRight" Margin="130,0,0,0" Orientation="Horizontal" HorizontalAlignment="Left">
                                        <Button Height="22" Width="50" Margin="0,0,6,0" Content="Up" Name="btnWebResourceMoveUp" Click="btnWebResourceMoveUp_Click" />
                                        <Button Height="22" Width="50" Margin="0,0,6,0" Content="Down" Name="btnWebResourceMoveDown" Click="btnWebResourceMoveDown_Click" />
                                    </StackPanel>
                                    <StackPanel Grid.Row="0" FlowDirection="LeftToRight" Orientation="Horizontal" HorizontalAlignment="Right">
                                        <Button Height="22" Width="50" Margin="0,0,6,0" Content="Remove" Name="btnResourceRemoved" Click="btnResourceRemoved_Click" />
                                    </StackPanel>
                                    <ScrollViewer Grid.Row="1" CanContentScroll="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                                        <TreeView Name="tvWebResources" BorderBrush="{x:Null}" SelectedItemChanged="tvWebResources_SelectedItemChanged" MouseUp="tvWebResources_MouseUp">
                                        </TreeView>
                                    </ScrollViewer>
                                    <Label Grid.Row="2" Background="#87BCACFF" Content="Displays web resources that are bound to the selected form" FontStyle="Italic" Padding="5,2" Foreground="#B6000000" />
                                    
                                </Grid>
                                <Grid Grid.Row="4">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Grid.Row="0" Content="Available web resources" Background="#CCCCCCCC" />
                                    <StackPanel Grid.Row="0" FlowDirection="LeftToRight" Orientation="Horizontal" HorizontalAlignment="Right">
                                        <Button Height="22" Width="65" Margin="0,0,6,0" Content="Refresh" Name="btnRefreshResources" Click="btnRefreshResources_Click" />
                                        <Button Height="22" Width="40" Margin="0,0,6,0" Content="Link" Name="btnLinkResource" Click="btnLinkResource_Click" />
                                    </StackPanel>
                                    <ScrollViewer Grid.Row="1" CanContentScroll="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                                        <TreeView Name="tvAvailableWebResources"  BorderBrush="{x:Null}" >
                                        </TreeView>
                                    </ScrollViewer>
                                    <Label Grid.Row="2" Background="#CCCCCCCC" Content="Displays available web resources" FontStyle="Italic" Padding="5,2" Foreground="#B6000000" />
                                </Grid>
                            </Grid>
                            <Grid Grid.Column="2">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="240" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="4*" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="9*" />
                                </Grid.RowDefinitions>
                                <GridSplitter Grid.Row="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="3" Name="gridSplitterRow3"  Width="Auto" ResizeDirection="Rows" Background="#95000000"/>
                                <Grid Grid.Row="1" Height="3" Background="#cccccccc">
                                    
                                </Grid>
                                <Grid Grid.Row="0">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>
                                    <Label Content="Register New Event" Background="#2CFF0000" />
                                    <StackPanel Grid.Row="0" FlowDirection="LeftToRight" Orientation="Horizontal" HorizontalAlignment="Right">
                                        <Button Height="22" Width="40" Margin="0,0,6,0" Content="Save" Name="btnEventSaveEdit" Visibility="Hidden" Click="btnEventSaveEdit_Click" />
                                        <Button Height="22" Width="50" Margin="0,0,6,0" Content="Cancel" Name="btnEventCancelEdit" Visibility="Hidden" Click="btnEventCancelEdit_Click" />
                                        <Button Height="22" Width="40" Margin="0,0,6,0" Content="Add" Name="btnAddEvent" Click="btnAddEvent_Click" />
                                    </StackPanel>
                                    <Label Content="Library: " Grid.Row="1" Height="19" HorizontalAlignment="Left" Margin="15,10,0,0" Name="label2" VerticalAlignment="Top" Padding="0" />
                                    <CheckBox Content="Pass execution context" Grid.Row="1" Height="16" HorizontalAlignment="Left" Margin="15,117,0,0" Name="chkEventPassContext" VerticalAlignment="Top" />
                                    <CheckBox Content="Enabled" Height="16" HorizontalAlignment="Left" Margin="15,98,0,0" Name="chkEventEnabled" VerticalAlignment="Top" Grid.Row="1" IsEnabled="True" IsChecked="True" />
                                    <TextBox Grid.Row="1" Height="40" Margin="15,163,14,0" Name="txtArgs" VerticalAlignment="Top" />
                                    <Label Content="Comma separated args" Grid.Row="1" Height="19" HorizontalAlignment="Left" Margin="15,142,0,0" Name="label3" VerticalAlignment="Top" Padding="0" />
                                    <Label Content="Function: " Height="19" HorizontalAlignment="Left" Margin="15,39,0,0" Name="label4" Padding="0" VerticalAlignment="Top" Grid.Row="1" />
                                    <TextBox Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="72,7,0,0" Name="txtLibrary" VerticalAlignment="Top" Width="242" />
                                    <TextBox Height="23" HorizontalAlignment="Left" Margin="72,36,0,0" Name="txtFunction" VerticalAlignment="Top" Width="242" Grid.Row="1" />
                                    <ComboBox Height="22" Margin="72,64,0,0" Width="120" Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Left" Name="cmbEventType" SelectedValuePath="Content" SelectionChanged="cmbEventType_SelectionChanged">
                                        <ComboBoxItem Content="OnLoad" />
                                        <ComboBoxItem Content="OnSave" />
                                        <ComboBoxItem Content="OnChange" />
                                        <ComboBoxItem Content="TabStateChange" />
                                    </ComboBox>
                                    <Label Content="Event:" Height="19" HorizontalAlignment="Left" Margin="15,68,0,0" Name="label5" Padding="0" VerticalAlignment="Top" Grid.Row="1" />
                                </Grid>
                                
                                <Grid Grid.Column="2" Grid.Row="2">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="Registered Events" Background="#2C00B100" />
                                    <StackPanel Grid.Row="0" FlowDirection="LeftToRight" Margin="130,0,0,0" Orientation="Horizontal" HorizontalAlignment="Left">
                                        <Button Height="22" Width="50" Margin="0,0,6,0" Content="Up" Name="btnEventMoveUp" Click="btnEventMoveUp_Click" />
                                        <Button Height="22" Width="50" Margin="0,0,6,0" Content="Down" Name="btnEventMoveDown" Click="btnEventMoveDown_Click" />
                                    </StackPanel>
                                    <StackPanel Grid.Row="0" FlowDirection="LeftToRight" Orientation="Horizontal" HorizontalAlignment="Right">
                                        <Button Height="22" Width="55" Margin="0,0,6,0" Content="Delete" Name="btnDeleteRegisteredEvent" Click="btnDeleteRegisteredEvent_Click" />
                                    </StackPanel>
                                    <StackPanel Grid.Row="0" FlowDirection="LeftToRight" Orientation="Horizontal" HorizontalAlignment="Right"></StackPanel>
                                    <ScrollViewer Grid.Row="1" CanContentScroll="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                                        <TreeView Name="tvEvents" BorderBrush="{x:Null}" SelectedItemChanged="tvEvents_SelectedItemChanged" MouseUp="tvEvents_MouseUp">
                                        </TreeView>
                                    </ScrollViewer>
                                    <Label Grid.Row="2" Content="Displays registered events for selected form element. Click event to edit" Background="#2C00B100" FontStyle="Italic" Padding="5,2" Foreground="#B6000000" />
                                </Grid>
                                <Grid Grid.Column="2" Grid.Row="4">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Label Content="Javascript Functions" Background="#4000ACFF" />
                                    <StackPanel Grid.Row="0" FlowDirection="LeftToRight" Margin="130,0,0,0" Orientation="Horizontal" HorizontalAlignment="Right">
                                        <Button Height="22" Width="55" Margin="0,0,6,0" Content="Refresh" Name="btnRefresh" Click="btnRefresh_Click" />
                                    </StackPanel>
                                    <ScrollViewer Grid.Row="1" CanContentScroll="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                                        <TreeView Name="tvFunction" BorderBrush="{x:Null}" SelectedItemChanged="tvFunction_SelectedItemChanged" MouseUp="tvFunction_MouseUp">
                                        </TreeView>
                                    </ScrollViewer>
                                    <Label Grid.Row="2" Background="#4000ACFF" Content="Displays functions found in selected web resource" FontStyle="Italic" Padding="5,2" Foreground="#B6000000" />
                                </Grid>
                            </Grid>
                            <GridSplitter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="3" Name="gridSplitterColumn"  Height="Auto" ResizeDirection="Columns" Background="#95000000" />
                        </Grid>
                    </TabItem>
                    <TabItem Header="FormXml" Name="tabFormXml" Visibility="Hidden">
                        <TextBox Name="txtFormXml" Width="{Binding ElementName=Container,Path=ActualWidth}" AutoWordSelection="True" VerticalScrollBarVisibility="Visible" IsReadOnly="True" IsManipulationEnabled="True" IsReadOnlyCaretVisible="True" Text="" />
                    </TabItem>
                </TabControl>
                <GroupBox Header="Create Solution" Height="100" Margin="11,12,0,0" Name="groupBox6" VerticalAlignment="Top" BorderBrush="#75000000" HorizontalAlignment="Left" Width="726">
                    <Grid>
                        <Label Content="Select Entity" Height="28" HorizontalAlignment="Left" Margin="8,9,0,0" Name="label1" VerticalAlignment="Top" />
                        <ComboBox Height="23" HorizontalAlignment="Left" IsEditable="True" Margin="97,12,0,0" Name="cmbEntities" VerticalAlignment="Top" Width="361" SelectionChanged="cmbEntities_SelectionChanged" />
                        <Button Content="Create Solution" Height="23" HorizontalAlignment="Left" Margin="464,12,0,0" Name="btnDownloadFormXml" VerticalAlignment="Top" Width="118" Click="btnDownloadFormXml_Click" />
                        <Button Content="Delete Solution" Height="23" HorizontalAlignment="Left" Margin="588,12,0,0" Name="btnDeleteSolution" VerticalAlignment="Top" Width="118" Click="btnDeleteSolution_Click" />
                        <Label Content="Select Solution" Height="28" HorizontalAlignment="Left" Margin="8,44,0,0" Name="label6" VerticalAlignment="Top" />
                        <ComboBox Height="23" HorizontalAlignment="Left" IsEditable="True" Margin="97,46,0,0" Name="cmbSolutions" VerticalAlignment="Top" Width="361" />
                        <Button Content="Load Solution" Height="23" HorizontalAlignment="Left" Margin="464,46,0,0" Name="btnLoadSolution" VerticalAlignment="Top" Width="118" Click="btnLoadSolution_Click" />
                        <Button Content="Save and Publish" Height="23" HorizontalAlignment="Left" Margin="588,46,0,0" Name="btnSaveAndPubish" VerticalAlignment="Top" Width="118" Click="btnSaveAndPubish_Click" />
                    </Grid>
                </GroupBox>
            </Grid>
            <DockPanel.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="White" Offset="0" />
                    <GradientStop Color="#00000000" Offset="1" />
                </LinearGradientBrush>
            </DockPanel.Background>
        </DockPanel>
    </DockPanel>
</Window>
